/**
 * Created by John on 2016/7/6.
 */
var mongo = new Mongo('localhost');
var newDB = mongo.getDB('BeginningMongoDB');

var collections = newDB.getCollectionNames();
print('Initial Collections');
printjson(collections);

var collection= newDB.getCollection('newCollectionA');
collection.drop();
collection= newDB.getCollection('newCollectionB');
collection.drop();
print('After Deleting Collection: ');

collections = newDB.getCollectionNames();
printjson(collections);